package com.vcredit.creditcat.service;
import com.vcredit.creditcat.model.CreditAssure;
import com.vcredit.creditcat.persistence.CreditAssureExtMapper;
import com.vcredit.creditcat.persistence.base.CreditAssureMapper;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 
 **/
@Service
public class CreditAssureService {
	@Autowired
    private CreditAssureMapper mapper;
	
	@Autowired
    private CreditAssureExtMapper extMapper;
    
    public void insert(CreditAssure obj){
    	mapper.insert(obj);
    }
    
    public void update(CreditAssure obj){
    	mapper.update(obj);
    }
    
    public List<CreditAssure> findAll(){
		return mapper.findAll();
	}
	
    public List<CreditAssure> find(CreditAssure obj){
		return mapper.find(obj);
	}
	
    public CreditAssure findById(Long id){
    	return mapper.findById(id);
	}
    
    public CreditAssure findByProcessId(Long processId){
    	return mapper.findByProcessId(processId);
	}
    
    public List<CreditAssure> findCanAssure(){
		return extMapper.findCanAssure();
	}

	public List<CreditAssure> findToSubmitAssure() {
		return extMapper.findToSubmitAssure();
	}

	public List<CreditAssure> findToGetReport() {
		return extMapper.findToGetReport();
	}

	public List<CreditAssure> findToComplianceQuery() {
		return extMapper.findToComplianceQuery();
	}

	public void resetStatus(CreditAssure creditAssure) {
		update(creditAssure);		
	}

	public List<CreditAssure> findToPreAudit() {
		return extMapper.findToPreAudit();
	}
}